# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-wordcloud
_pkgname=wordcloud
pkgver=1.9.4
pkgrel=1
pkgdesc='A little word cloud generator.'
arch=('x86_64' 'aarch64')
url='https://pypi.org/project/wordcloud/#files'
license=('MIT')
depends=('python' 'python-numpy' 'python-pillow' 'python-matplotlib')
makedepends=('python-build' 'python-pip' 'python-wheel')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('31ac7c1e85b74476c2c0668110a1cf6504439623d9c1f282515e06f11e6b41c07604921a73d49c140e6f35fe6c3762a5871b15082c66d1b42aac84b89019ba91')

build() {
  cd "$_pkgname-$pkgver"

  python -m build --wheel --outdir="$startdir/dist"
}

package() {
  cd "$_pkgname-$pkgver"

  pip install \
    --verbose \
    --disable-pip-version-check \
    --no-warn-script-location \
    --ignore-installed \
    --no-compile \
    --no-deps \
    --root="$pkgdir" \
    --prefix=/usr \
    --no-index \
    --find-links="file://$startdir/dist" \
    $_pkgname
}

